home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / gtlayout-source.lha / LTP_Memory.c < prev    next >
C/C++ Source or Header  |  1996-03-18  |  659b  |  41 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14.  
  15. /*****************************************************************************/
  16.  
  17.  
  18. APTR
  19. LTP_Alloc(LayoutHandle *handle,ULONG amount)
  20. {
  21.     APTR result;
  22.  
  23.     result = AsmAllocPooled(handle->Pool,amount,SysBase);
  24.  
  25.     if(!result)
  26.         handle->Failed = TRUE;
  27.  
  28.     return(result);
  29. }
  30.  
  31.  
  32. /*****************************************************************************/
  33.  
  34.  
  35. VOID
  36. LTP_Free(LayoutHandle *handle,APTR mem,ULONG memsize)
  37. {
  38.     if(mem)
  39.         AsmFreePooled(handle->Pool,mem,memsize,SysBase);
  40. }
  41.